package com.srzk.youthleagueback.mapper;

import com.srzk.youthleagueback.pojo.SocialPracticePic;
import com.srzk.youthleagueback.pojo.ThematicPic;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;
@Mapper
@Repository
public interface SocialPracticePicMapper {
    @Insert("insert into social_practice_pic (id,picture)" +
            "values (#{social_practice_pic.id}, #{social_practice_pic.picture})")
    int insert(@Param("social_practice_pic") SocialPracticePic record);

    @Select("SELECT * FROM social_practice_pic WHERE id = #{id}")
    List<SocialPracticePic> selectByPrimaryKeyList(Long id);

    List<ThematicPic> selectAll();

    @Delete("DELETE FROM social_practice_pic WHERE id = #{id}")
    int deleteByUserAndYearAndTypeAndId(@Param("id")Long id);
}